package com.github.wxiaoqi.security.biz.modules.merchant.api;

import java.util.Map;

import javax.validation.Valid;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.github.wxiaoqi.security.biz.common.biz.request.QueryApkVersionReq;
import com.github.wxiaoqi.security.biz.modules.merchant.biz.ApkVersiontBiz;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;

/**
 * POS-apk版本-对外
 * @author Administrator
 *
 */
@Api(tags="apk版本管理")
@Controller
@RequestMapping("apkVersion")
public class ApkVersionController {
	
	Logger logger = LoggerFactory.getLogger(ApkVersionController.class);
	
	@Autowired
	private ApkVersiontBiz apkVersiontBiz;
	
	/**
	 * apk版本信息查询
	 * @return
	 * @throws Exception 
	 */ 
	@ApiOperation("apk版本信息查询")
	@RequestMapping(value = "/query",method = RequestMethod.POST)
    @ResponseBody
	public Map<String, Object> queryApkVersion(@RequestBody @Valid QueryApkVersionReq params) throws Exception{
		logger.info("apk版本信息查询。。。。。{}",params);
		Map<String, Object> response = apkVersiontBiz.queryApkVersionInfo(params);
		return response;
	}
}